<template>
  <div class="Login">
    <div class="bg"></div>
    <component :is="currentView" :current="currentView" @changeCurrent="change($event)"></component>
  </div>
</template>

<script>
  import LoginEntry from '@/components/Login/LoginEntry'
  import LoginRegister from '@/components/Login/LoginRegister'
  export default {
    name: "Login",
    components: {
      LoginEntry,
      LoginRegister
    },
    data() {
      return {
        code: 0,
        currentView: "LoginEntry"
      }
    },
    methods: {
      change(msg) {
        let _this = this;
        _this.currentView = msg;
      }
    },
  }
</script>

<style scoped>
  .Login {
    position: absolute;
    background-image: url('../assets/img/background-image.jpg');
    background-repeat: no-repeat;
    /*background-attachment: fixed;*/
    /*background-position: center center;*/
    background-size: cover;
    font-size: 15px;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }

  .bg {
    width: 100%;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    background: rgba(0, 0, 0, 0.1);
    z-index: 3;
  }
</style>
